package com.wenjie.original.entity.vo.SysConfig;

import com.wenjie.original.entity.SysConfig;
import com.wenjie.original.entity.common.vo.IResVo;
import com.wenjie.original.entity.common.vo.ISelVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;


public class SysConfigVo {

    @Data
    public static class SelVo extends SysConfig implements ISelVo<SysConfig> {
        @ApiModelProperty("当前页")
        private Integer pn = 1;

        @ApiModelProperty("页数")
        private Integer ps = 10;

        @Override
        @NotBlank(message = "参数名称不能为空")
        @Size(min = 0, max = 100, message = "参数名称不能超过100个字符")
        public String getConfigName() {
            return super.getConfigName();
        }

        @Override
        @NotBlank(message = "参数键名长度不能为空")
        @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符")
        public String getConfigKey() {
            return super.getConfigKey();
        }

        @Override
        @NotBlank(message = "参数键值不能为空")
        @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符")
        public String getConfigValue() {
            return super.getConfigValue();
        }

    }

    @Data
    public static class ResVo extends SysConfig implements IResVo<SysConfig> {
    }
}
